package edu.eam.paii.proyecto.entidades;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.*;
@Entity
/**
 * @author Hector Bedoya Ortegon
 * @author Felipe Suarez Bedoya
 * Esta entidad permite administrar toda la informacion de un turno efectuado. 
 **/
public class Turno implements Serializable {
@Id
private int id_Turno;
private int hora_Inicio;
private int hora_Fin;
private Date fecha;


@ManyToOne
@JoinColumn(name = "id_Empleado")
private Empleado turnoEmpleado ;

@OneToMany(mappedBy = "turnoTransaccion", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private List<Transaccion> transacciones;

@OneToMany(mappedBy = "arqueoTurno", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private List<Arqueo> arqueos;

@OneToMany(mappedBy = "cuotaTurno", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private List<Cuota> turnoCuotas;

@OneToMany(mappedBy="turnoCajero",fetch=FetchType.LAZY,cascade=CascadeType.ALL)
private List<Cajero> Cajeros;


@OneToMany(mappedBy="turnoTransaccion",fetch=FetchType.LAZY,cascade=CascadeType.ALL)
private List<Transaccion> transaccionTurno;

}
